#include<stdio.h>
#include<math.h>

int main(){
	float x, y;
	scanf("%f,%f", &x, &y);
	putchar(fabs(sqrt(x*x+y*y)-1)<10e-3?'Y':'N');
}
